package balmysundaycandy.more.low.level.logger.impl;

import balmysundaycandy.more.low.level.logger.ProtocolBufferLogContents;
import balmysundaycandy.more.low.level.logger.ProtocolBufferLogger;

/**
 * logging by stdio.
 * 
 * @author marblejenka
 *
 */
public class StandardOutputLogger implements ProtocolBufferLogger {

	@Override
	public boolean log(String message) {
		System.out.println(message);
		return true;
	}

	@Override
	public boolean log(ProtocolBufferLogContents logContents) {
		if (logContents == null) {
			throw new NullPointerException("logcontens is null.");
		}

		return log(logContents.toString());
	}

}
